using SqlSugar;
using Volo.Abp.Auditing;
using Volo.Abp.Domain.Entities;

namespace UserService.Domain.Entities;

/// <summary>
/// 好友分组实体 - 用于对好友进行分类管理
/// </summary>
[SugarTable("FriendshipGroups")]
public class FriendshipGroup : Entity<Guid>, IHasCreationTime
{
    /// <summary>
    /// 分组唯一标识
    /// </summary>
    [SugarColumn(IsPrimaryKey = true, IsIdentity = false)]
    public override Guid Id { get; protected set; }

    /// <summary>
    /// 所属用户ID
    /// </summary>
    [SugarColumn(IsNullable = false)]
    public Guid UserId { get; set; }

    /// <summary>
    /// 分组名称
    /// </summary>
    [SugarColumn(Length = 50, IsNullable = false)]
    public string Name { get; set; }

    /// <summary>
    /// 分组排序
    /// </summary>
    [SugarColumn(IsNullable = false)]
    public int SortOrder { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [SugarColumn(IsNullable = false)]
    public DateTime CreationTime { get; set; } = DateTime.Now;
}